Optimal. Leaf size=90 \[ \frac {(a+b x) \left (A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )\right )}{(b f-a g) (f+g x)}+\frac {2 B (b c-a d) \log \left (\frac {f+g x}{c+d x}\right )}{(b f-a g) (d f-c g)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2554, 2351, 31}
\begin {gather*} \frac {(a+b x) \left (B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )+A\right )}{(f+g x) (b f-a g)}+\frac {2 B (b c-a d) \log \left (\frac {f+g x}{c+d x}\right )}{(b f-a g) (d f-c g)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2351
Rule 2554
Rubi steps
\begin {align*} \int \frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{(f+g x)^2} \, dx &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{g (f+g x)}+\frac {B \int \frac {2 (b c-a d)}{(a+b x) (c+d x) (f+g x)} \, dx}{g}\\ &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{g (f+g x)}+\frac {(2 B (b c-a d)) \int \frac {1}{(a+b x) (c+d x) (f+g x)} \, dx}{g}\\ &=-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{g (f+g x)}+\frac {(2 B (b c-a d)) \int \left (\frac {b^2}{(b c-a d) (b f-a g) (a+b x)}+\frac {d^2}{(b c-a d) (-d f+c g) (c+d x)}+\frac {g^2}{(b f-a g) (d f-c g) (f+g x)}\right ) \, dx}{g}\\ &=\frac {2 b B \log (a+b x)}{g (b f-a g)}-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{g (f+g x)}-\frac {2 B d \log (c+d x)}{g (d f-c g)}+\frac {2 B (b c-a d) \log (f+g x)}{(b f-a g) (d f-c g)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 108, normalized size = 1.20 \begin {gather*} \frac {-\frac {A+B \log \left (\frac {e (a+b x)^2}{(c+d x)^2}\right )}{f+g x}+\frac {2 B (b (d f-c g) \log (a+b x)+(-b d f+a d g) \log (c+d x)+(b c-a d) g \log (f+g x))}{(b f-a g) (d f-c g)}}{g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(298\) vs.
\(2(90)=180\).
time = 0.42, size = 299, normalized size = 3.32
method | result | size |
risch | \(-\frac {B \ln \left (\frac {e \left (b x +a \right )^{2}}{\left (d x +c \right )^{2}}\right )}{g \left (g x +f \right )}-\frac {2 B \ln \left (g x +f \right ) a d \,g^{2} x -2 B \ln \left (g x +f \right ) b c \,g^{2} x +2 B \ln \left (-b x -a \right ) b c \,g^{2} x -2 B \ln \left (-b x -a \right ) b d f g x -2 B \ln \left (-d x -c \right ) a d \,g^{2} x +2 B \ln \left (-d x -c \right ) b d f g x +2 B \ln \left (g x +f \right ) a d f g -2 B \ln \left (g x +f \right ) b c f g +2 B \ln \left (-b x -a \right ) b c f g -2 B \ln \left (-b x -a \right ) b d \,f^{2}-2 B \ln \left (-d x -c \right ) a d f g +2 B \ln \left (-d x -c \right ) b d \,f^{2}+A a c \,g^{2}-A a d f g -A b c f g +A b d \,f^{2}}{\left (c g -d f \right ) \left (a g -b f \right ) \left (g x +f \right ) g}\) | \(285\) |
derivativedivides | \(-\frac {-\frac {d^{2} A}{\left (\frac {c g -d f}{d x +c}-g \right ) \left (c g -d f \right )}+\frac {-\frac {b B d \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{a g -b f}-\frac {B d \left (a d -c b \right ) \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{\left (a g -b f \right ) \left (d x +c \right )}}{\frac {c g}{d x +c}-\frac {f d}{d x +c}-g}+\frac {2 B \,d^{2} \ln \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right ) a}{a c \,g^{2}-a d f g -b c f g +b d \,f^{2}}-\frac {2 B d \ln \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right ) b c}{a c \,g^{2}-a d f g -b c f g +b d \,f^{2}}}{d}\) | \(299\) |
default | \(-\frac {-\frac {d^{2} A}{\left (\frac {c g -d f}{d x +c}-g \right ) \left (c g -d f \right )}+\frac {-\frac {b B d \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{a g -b f}-\frac {B d \left (a d -c b \right ) \ln \left (\frac {e \left (\frac {a d}{d x +c}-\frac {b c}{d x +c}+b \right )^{2}}{d^{2}}\right )}{\left (a g -b f \right ) \left (d x +c \right )}}{\frac {c g}{d x +c}-\frac {f d}{d x +c}-g}+\frac {2 B \,d^{2} \ln \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right ) a}{a c \,g^{2}-a d f g -b c f g +b d \,f^{2}}-\frac {2 B d \ln \left (\frac {c g}{d x +c}-\frac {f d}{d x +c}-g \right ) b c}{a c \,g^{2}-a d f g -b c f g +b d \,f^{2}}}{d}\) | \(299\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 195 vs.
\(2 (91) = 182\).
time = 0.28, size = 195, normalized size = 2.17 \begin {gather*} B {\left (\frac {2 \, b \log \left (b x + a\right )}{b f g - a g^{2}} - \frac {2 \, d \log \left (d x + c\right )}{d f g - c g^{2}} + \frac {2 \, {\left (b c - a d\right )} \log \left (g x + f\right )}{b d f^{2} + a c g^{2} - {\left (b c + a d\right )} f g} - \frac {\log \left (\frac {b^{2} x^{2} e}{d^{2} x^{2} + 2 \, c d x + c^{2}} + \frac {2 \, a b x e}{d^{2} x^{2} + 2 \, c d x + c^{2}} + \frac {a^{2} e}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right )}{g^{2} x + f g}\right )} - \frac {A}{g^{2} x + f g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 277 vs.
\(2 (91) = 182\).
time = 3.19, size = 277, normalized size = 3.08 \begin {gather*} -\frac {A b d f^{2} + A a c g^{2} - {\left (A b c + A a d\right )} f g - 2 \, {\left (B b d f^{2} - B b c f g + {\left (B b d f g - B b c g^{2}\right )} x\right )} \log \left (b x + a\right ) + 2 \, {\left (B b d f^{2} - B a d f g + {\left (B b d f g - B a d g^{2}\right )} x\right )} \log \left (d x + c\right ) - 2 \, {\left ({\left (B b c - B a d\right )} g^{2} x + {\left (B b c - B a d\right )} f g\right )} \log \left (g x + f\right ) + {\left (B b d f^{2} + B a c g^{2} - {\left (B b c + B a d\right )} f g\right )} \log \left (\frac {{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )} e}{d^{2} x^{2} + 2 \, c d x + c^{2}}\right )}{b d f^{3} g + a c f g^{3} - {\left (b c + a d\right )} f^{2} g^{2} + {\left (b d f^{2} g^{2} + a c g^{4} - {\left (b c + a d\right )} f g^{3}\right )} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.34, size = 191, normalized size = 2.12 \begin {gather*} \frac {2\,B\,d\,\ln \left (c+d\,x\right )}{c\,g^2-d\,f\,g}-\frac {B\,\ln \left (\frac {e\,a^2+2\,e\,a\,b\,x+e\,b^2\,x^2}{c^2+2\,c\,d\,x+d^2\,x^2}\right )}{x\,g^2+f\,g}-\frac {2\,B\,b\,\ln \left (a+b\,x\right )}{a\,g^2-b\,f\,g}-\frac {A}{x\,g^2+f\,g}-\frac {2\,B\,a\,d\,\ln \left (f+g\,x\right )}{a\,c\,g^2+b\,d\,f^2-a\,d\,f\,g-b\,c\,f\,g}+\frac {2\,B\,b\,c\,\ln \left (f+g\,x\right )}{a\,c\,g^2+b\,d\,f^2-a\,d\,f\,g-b\,c\,f\,g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________